'''
Descripttion: 
version: 
Author: Born
Date: 2020-11-16 15:02:47
LastEditors: Born
'''

from django.contrib.auth.backends import BaseBackend
from django.contrib.auth.models import User

class MyBackend(BaseBackend):
    def authenticate(self, request, token=None):
        # Check the token and return a user.
        # pass
        user = User(username='20190088')
    
    
    def get_user(self, user_id):
        try:
            return User.objects.get(pk=user_id)
        except User.DoesNotExist:
            return None